import java.util.Arrays;
import java.util.Scanner;

public class Text1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
            int empty=in.nextInt();
            int num=0,num1=0;
            while(empty>=2)
            {
                if(empty==2)
                {
                    num++;
                    empty=0;
                }
                else {
                    num+=empty/3;
                    num1=empty/3;
                    empty=empty%3+num1;
                }
            }
            System.out.println(num);

    }
}
